package com.lcf.app.validation.model.dto;

import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;

/**
 * @author ChenFei
 * @date 2021/10/25
 */
@Data
public class UserDTO {

    @NotBlank(message = "用户名不能空", groups = {Save.class})
    private String username;

    @NotNull(message = "年龄不能为空")
    private Integer age;

    @NotNull(message = "生日不能为空")
    private LocalDateTime birthday;

    @NotEmpty(message = "至少要有一个卡")
    private List<String> cards = new ArrayList<>();

}
